﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace CNav.Model
{
    public class RegisterBusinessModel
    {
        [Required, Display(Name = "Business name")]
        public string BusinessName { get; set; }

        [Required, Display(Name = "Email address"), EmailAddress]
        public string Email { get; set; }

        [Required, StringLength(20, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password), Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password), Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }

        [Required, Display(Name = "Phone"), Phone]
        public string PhoneNumber { get; set; }

        [Display(Name = "Fax"), Phone]
        public string FaxNumber { get; set; }
    }

    public class UpdateBusinessModel
    {
        public string ID { get; set; }

        [Required, Display(Name = "Business name")]
        public string BusinessName { get; set; }

        [Required, Display(Name = "Email address"), EmailAddress]
        public string Email { get; set; }

        public AddressModel Address { get; set; }

        public int AddressID { get; set; }

        [Required, Display(Name = "Phone"), Phone]
        public string PhoneNumber { get; set; }

        [Display(Name = "Fax"), Phone]
        public string FaxNumber { get; set; }
    }
}